//
//  ViewController.h
//  Kiosk
//
//  Created by Raffael Reichelt on 17.12.12.
//  Copyright (c) 2012 Raffael Reichelt. All rights reserved.
//

#import <UIKit/UIKit.h>

#import <AudioToolbox/AudioToolbox.h>
#import <QuartzCore/QuartzCore.h>

#import "JournalViewController.h"

@interface ViewController : UIViewController <UIWebViewDelegate, JournalViewControllerDelegate> {
    NSMutableDictionary *Journal;
    CFURLRef		soundFileURLRef;
	SystemSoundID	soundFileObject;

}

@property IBOutlet UIToolbar* toolbar;
@property IBOutlet UIBarItem* back;
@property IBOutlet UIBarItem* info;
@property IBOutlet UIBarItem* home;
@property IBOutlet UIBarItem* favorites;
@property IBOutlet UIBarItem* forward;
@property IBOutlet UIWebView* webView;

@property NSString* StartingPage;
@property BOOL PortalMode;
@property BOOL LearningMode;
@property BOOL showAlerts;

@property NSManagedObjectContext *managedObjectContext;

@property CFURLRef		soundFileURLRef;
@property SystemSoundID	soundFileObject;


- (IBAction)loadHome:(id)sender;
- (IBAction)showInfo:(id)sender;
- (IBAction)showFavorites:(id)sender;


- (void) updateButtons;
- (void) readPreferences;

- (NSMutableDictionary *) readJournal;
- (NSMutableDictionary *) getJournal;
- (BOOL) setJournal: (NSMutableDictionary *) dictionary;
- (BOOL) writeJournal: (NSMutableDictionary *) dictionary;

@end

